function sleep(ms){
    return new Promise(resolve=>{
        setTimeout(resolve,ms)
    })
}

async function test(){
    console.log('start')
    await sleep(1000)
    console.log('end')
}
console.log(test());